using System;
using System.Collections;

using System.Xml.Serialization;

namespace Evaluant.Uss.DomainModel.OptionModel
{
	[Serializable]
	public class EntityOptionCollection : CollectionBase
	{

		public int Add(EntityOption value)
		{
			return base.List.Add(value as object);
		}

		public void Remove(EntityOption value)
		{
			base.List.Remove( (object)value);
		}

		public void Insert(int index, EntityOption value)
		{
			base.List.Insert(index, (object)value);
		}

		public bool Contains(EntityOption value)
		{
			return base.List.Contains( (object)value);
		}

		public EntityOption this[int index]
		{
			get { return ( (EntityOption)base.List[index]); }
		}

		public EntityOption GetEntityOptionByName(string className)
		{
			foreach(EntityOption entity in base.List)
				if(entity.ClassName == className)
					return entity;
			return null;
		}
	}
}
